/*
'===============================================================================
'  Generated From - CSharp_EasyObject_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL      = SQL_DAAB_StoredProcs.vbgen
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easily done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.Common;
using System.Configuration;
using System.Collections;
using System.Collections.Specialized;
using System.Xml;
using System.IO;

using Microsoft.Practices.EnterpriseLibrary.Data;
using NCI.EasyObjects;

namespace CMS.DAL
{

	#region Schema

	public class TourCustomizationSchema : NCI.EasyObjects.Schema
	{
		private static ArrayList _entries;
		public static SchemaItem TourCustomizationID = new SchemaItem("TourCustomizationID", DbType.Int32, true, false, false, true, false, false);
		public static SchemaItem FullName = new SchemaItem("FullName", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Address = new SchemaItem("Address", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem CountryID = new SchemaItem("CountryID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem CityName = new SchemaItem("CityName", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Telephone = new SchemaItem("Telephone", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Fax = new SchemaItem("Fax", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem Email = new SchemaItem("Email", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem ExpectedDepartureDate = new SchemaItem("ExpectedDepartureDate", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Adults = new SchemaItem("Adults", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Children = new SchemaItem("Children", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem DurationID = new SchemaItem("DurationID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem PortOfArrivalID = new SchemaItem("PortOfArrivalID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem VisitationSuggestion = new SchemaItem("VisitationSuggestion", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem TourCategorySuggestion = new SchemaItem("TourCategorySuggestion", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem GuideSuggestion = new SchemaItem("GuideSuggestion", DbType.String, SchemaItemJustify.None, 250, true, false, false, false);
		public static SchemaItem GuideID = new SchemaItem("GuideID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem OtherRequest = new SchemaItem("OtherRequest", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem PaymentID = new SchemaItem("PaymentID", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem BookingDate = new SchemaItem("BookingDate", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Status = new SchemaItem("Status", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem EverHeard = new SchemaItem("EverHeard", DbType.Int32, false, true, false, false, false, false);

		public override ArrayList SchemaEntries
		{
			get
			{
				if (_entries == null )
				{
					_entries = new ArrayList();
					_entries.Add(TourCustomizationSchema.TourCustomizationID);
					_entries.Add(TourCustomizationSchema.FullName);
					_entries.Add(TourCustomizationSchema.Address);
					_entries.Add(TourCustomizationSchema.CountryID);
					_entries.Add(TourCustomizationSchema.CityName);
					_entries.Add(TourCustomizationSchema.Telephone);
					_entries.Add(TourCustomizationSchema.Fax);
					_entries.Add(TourCustomizationSchema.Email);
					_entries.Add(TourCustomizationSchema.ExpectedDepartureDate);
					_entries.Add(TourCustomizationSchema.Adults);
					_entries.Add(TourCustomizationSchema.Children);
					_entries.Add(TourCustomizationSchema.DurationID);
					_entries.Add(TourCustomizationSchema.PortOfArrivalID);
					_entries.Add(TourCustomizationSchema.VisitationSuggestion);
					_entries.Add(TourCustomizationSchema.TourCategorySuggestion);
					_entries.Add(TourCustomizationSchema.GuideSuggestion);
					_entries.Add(TourCustomizationSchema.GuideID);
					_entries.Add(TourCustomizationSchema.OtherRequest);
					_entries.Add(TourCustomizationSchema.PaymentID);
					_entries.Add(TourCustomizationSchema.BookingDate);
					_entries.Add(TourCustomizationSchema.Status);
					_entries.Add(TourCustomizationSchema.EverHeard);
				}
				return _entries;
			}
		}
		
		public static bool HasAutoKey 
		{
			get { return true;	}
		}

		public static bool HasRowID 
		{
			get { return false;	}
		}
	}
	#endregion

	public abstract class _TourCustomization : EasyObject
	{

		public _TourCustomization()
		{
			TourCustomizationSchema _schema = new TourCustomizationSchema();
			this.SchemaEntries = _schema.SchemaEntries;
			this.SchemaGlobal = "dbo";
		}
		
		public override void FlushData() 	 
		{ 	 
			this._whereClause = null; 	 
			this._aggregateClause = null; 	 
			base.FlushData(); 	 
		}
			   
		/// <summary>
		/// Loads the business object with info from the database, based on the requested primary key.
		/// </summary>
		/// <param name="TourCustomizationID"></param>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadByPrimaryKey(int TourCustomizationID)
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					ListDictionary parameters = new ListDictionary();

					// Add in parameters
					parameters.Add(TourCustomizationSchema.TourCustomizationID.FieldName, TourCustomizationID);

					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetTourCustomization", parameters, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.TourCustomizationID.Value = TourCustomizationID;
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}
	
		/// <summary>
		/// Loads all records from the table.
		/// </summary>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadAll()
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetAllTourCustomization", null, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		/// <summary>
		/// Adds a new record to the internal table.
		/// </summary>
		public override void AddNew()
		{
			base.AddNew();
			this.ApplyDefaults();
		}

		/// <summary>
		/// Apply any default values to columns
		/// </summary>
		protected override void ApplyDefaults()
		{
		}

		protected override DbCommand GetInsertCommand(CommandType commandType)
		{	
			DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_AddTourCustomization";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddParameter(dbCommand, "TourCustomizationID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "TourCustomizationID", DataRowVersion.Default, Convert.DBNull);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!item.IsComputed)
						{
							if ((item.IsAutoKey && this.IdentityInsert) || !item.IsAutoKey)
							{
								this.Query.AddInsertColumn(item);
							}
						}
					}
					dbCommand = this.Query.GetInsertCommandWrapper();

					dbCommand.Parameters.Clear();
					if (this.IdentityInsert)
					{
						db.AddInParameter(dbCommand, "TourCustomizationID", DbType.Int32, "TourCustomizationID", DataRowVersion.Default);
					}
					else
					{
						db.AddParameter(dbCommand, "TourCustomizationID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "TourCustomizationID", DataRowVersion.Default, Convert.DBNull);
					}
					CreateParameters(db, dbCommand);

					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetUpdateCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_UpdateTourCustomization";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddInParameter(dbCommand, "TourCustomizationID", DbType.Int32, "TourCustomizationID", DataRowVersion.Current);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!(item.IsAutoKey || item.IsComputed))
						{
							this.Query.AddUpdateColumn(item);
						}
					}

					this.Where.WhereClauseReset();
					this.Where.TourCustomizationID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetUpdateCommandWrapper();

					dbCommand.Parameters.Clear();
					CreateParameters(db, dbCommand);
					db.AddInParameter(dbCommand, "TourCustomizationID", DbType.Int32, "TourCustomizationID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetDeleteCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_DeleteTourCustomization";
					dbCommand = db.GetStoredProcCommand(sqlCommand);
					db.AddInParameter(dbCommand, "TourCustomizationID", DbType.Int32, "TourCustomizationID", DataRowVersion.Current);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.TourCustomizationID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetDeleteCommandWrapper();

					dbCommand.Parameters.Clear();
					db.AddInParameter(dbCommand, "TourCustomizationID", DbType.Int32, "TourCustomizationID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		private void CreateParameters(Database db, DbCommand dbCommand)
		{
			db.AddInParameter(dbCommand, "FullName", DbType.String, "FullName", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Address", DbType.String, "Address", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "CountryID", DbType.Int32, "CountryID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "CityName", DbType.String, "CityName", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Telephone", DbType.String, "Telephone", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Fax", DbType.String, "Fax", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Email", DbType.String, "Email", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "ExpectedDepartureDate", DbType.Int32, "ExpectedDepartureDate", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Adults", DbType.Int32, "Adults", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Children", DbType.Int32, "Children", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "DurationID", DbType.Int32, "DurationID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PortOfArrivalID", DbType.Int32, "PortOfArrivalID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "VisitationSuggestion", DbType.String, "VisitationSuggestion", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "TourCategorySuggestion", DbType.String, "TourCategorySuggestion", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "GuideSuggestion", DbType.String, "GuideSuggestion", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "GuideID", DbType.Int32, "GuideID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "OtherRequest", DbType.String, "OtherRequest", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PaymentID", DbType.Int32, "PaymentID", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "BookingDate", DbType.Int32, "BookingDate", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Status", DbType.Int32, "Status", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "EverHeard", DbType.Int32, "EverHeard", DataRowVersion.Current);
		}
		
		#region Properties
		public virtual int TourCustomizationID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.TourCustomizationID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.TourCustomizationID.FieldName, value);
			}
		}
		public virtual string FullName
		{
			get
			{
				return this.GetString(TourCustomizationSchema.FullName.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.FullName.FieldName, value);
			}
		}
		public virtual string Address
		{
			get
			{
				return this.GetString(TourCustomizationSchema.Address.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.Address.FieldName, value);
			}
		}
		public virtual int CountryID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.CountryID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.CountryID.FieldName, value);
			}
		}
		public virtual string CityName
		{
			get
			{
				return this.GetString(TourCustomizationSchema.CityName.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.CityName.FieldName, value);
			}
		}
		public virtual string Telephone
		{
			get
			{
				return this.GetString(TourCustomizationSchema.Telephone.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.Telephone.FieldName, value);
			}
		}
		public virtual string Fax
		{
			get
			{
				return this.GetString(TourCustomizationSchema.Fax.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.Fax.FieldName, value);
			}
		}
		public virtual string Email
		{
			get
			{
				return this.GetString(TourCustomizationSchema.Email.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.Email.FieldName, value);
			}
		}
		public virtual int ExpectedDepartureDate
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.ExpectedDepartureDate.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.ExpectedDepartureDate.FieldName, value);
			}
		}
		public virtual int Adults
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.Adults.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.Adults.FieldName, value);
			}
		}
		public virtual int Children
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.Children.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.Children.FieldName, value);
			}
		}
		public virtual int DurationID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.DurationID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.DurationID.FieldName, value);
			}
		}
		public virtual int PortOfArrivalID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.PortOfArrivalID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.PortOfArrivalID.FieldName, value);
			}
		}
		public virtual string VisitationSuggestion
		{
			get
			{
				return this.GetString(TourCustomizationSchema.VisitationSuggestion.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.VisitationSuggestion.FieldName, value);
			}
		}
		public virtual string TourCategorySuggestion
		{
			get
			{
				return this.GetString(TourCustomizationSchema.TourCategorySuggestion.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.TourCategorySuggestion.FieldName, value);
			}
		}
		public virtual string GuideSuggestion
		{
			get
			{
				return this.GetString(TourCustomizationSchema.GuideSuggestion.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.GuideSuggestion.FieldName, value);
			}
		}
		public virtual int GuideID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.GuideID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.GuideID.FieldName, value);
			}
		}
		public virtual string OtherRequest
		{
			get
			{
				return this.GetString(TourCustomizationSchema.OtherRequest.FieldName);
	    	}
			set
			{
				this.SetString(TourCustomizationSchema.OtherRequest.FieldName, value);
			}
		}
		public virtual int PaymentID
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.PaymentID.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.PaymentID.FieldName, value);
			}
		}
		public virtual int BookingDate
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.BookingDate.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.BookingDate.FieldName, value);
			}
		}
		public virtual int Status
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.Status.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.Status.FieldName, value);
			}
		}
		public virtual int EverHeard
		{
			get
			{
				return this.GetInteger(TourCustomizationSchema.EverHeard.FieldName);
	    	}
			set
			{
				this.SetInteger(TourCustomizationSchema.EverHeard.FieldName, value);
			}
		}

		public override string TableName
		{
			get { return "TourCustomization"; }
		}
		
		#endregion		
		
		#region String Properties
		public virtual string s_TourCustomizationID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.TourCustomizationID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.TourCustomizationID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.TourCustomizationID.FieldName);
			    else
			        this.TourCustomizationID = base.SetIntegerAsString(TourCustomizationSchema.TourCustomizationID.FieldName, value);
			}
		}
		public virtual string s_FullName
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.FullName.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.FullName.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.FullName.FieldName);
			    else
			        this.FullName = base.SetStringAsString(TourCustomizationSchema.FullName.FieldName, value);
			}
		}
		public virtual string s_Address
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Address.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.Address.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Address.FieldName);
			    else
			        this.Address = base.SetStringAsString(TourCustomizationSchema.Address.FieldName, value);
			}
		}
		public virtual string s_CountryID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.CountryID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.CountryID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.CountryID.FieldName);
			    else
			        this.CountryID = base.SetIntegerAsString(TourCustomizationSchema.CountryID.FieldName, value);
			}
		}
		public virtual string s_CityName
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.CityName.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.CityName.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.CityName.FieldName);
			    else
			        this.CityName = base.SetStringAsString(TourCustomizationSchema.CityName.FieldName, value);
			}
		}
		public virtual string s_Telephone
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Telephone.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.Telephone.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Telephone.FieldName);
			    else
			        this.Telephone = base.SetStringAsString(TourCustomizationSchema.Telephone.FieldName, value);
			}
		}
		public virtual string s_Fax
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Fax.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.Fax.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Fax.FieldName);
			    else
			        this.Fax = base.SetStringAsString(TourCustomizationSchema.Fax.FieldName, value);
			}
		}
		public virtual string s_Email
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Email.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.Email.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Email.FieldName);
			    else
			        this.Email = base.SetStringAsString(TourCustomizationSchema.Email.FieldName, value);
			}
		}
		public virtual string s_ExpectedDepartureDate
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.ExpectedDepartureDate.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.ExpectedDepartureDate.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.ExpectedDepartureDate.FieldName);
			    else
			        this.ExpectedDepartureDate = base.SetIntegerAsString(TourCustomizationSchema.ExpectedDepartureDate.FieldName, value);
			}
		}
		public virtual string s_Adults
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Adults.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.Adults.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Adults.FieldName);
			    else
			        this.Adults = base.SetIntegerAsString(TourCustomizationSchema.Adults.FieldName, value);
			}
		}
		public virtual string s_Children
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Children.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.Children.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Children.FieldName);
			    else
			        this.Children = base.SetIntegerAsString(TourCustomizationSchema.Children.FieldName, value);
			}
		}
		public virtual string s_DurationID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.DurationID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.DurationID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.DurationID.FieldName);
			    else
			        this.DurationID = base.SetIntegerAsString(TourCustomizationSchema.DurationID.FieldName, value);
			}
		}
		public virtual string s_PortOfArrivalID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.PortOfArrivalID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.PortOfArrivalID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.PortOfArrivalID.FieldName);
			    else
			        this.PortOfArrivalID = base.SetIntegerAsString(TourCustomizationSchema.PortOfArrivalID.FieldName, value);
			}
		}
		public virtual string s_VisitationSuggestion
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.VisitationSuggestion.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.VisitationSuggestion.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.VisitationSuggestion.FieldName);
			    else
			        this.VisitationSuggestion = base.SetStringAsString(TourCustomizationSchema.VisitationSuggestion.FieldName, value);
			}
		}
		public virtual string s_TourCategorySuggestion
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.TourCategorySuggestion.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.TourCategorySuggestion.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.TourCategorySuggestion.FieldName);
			    else
			        this.TourCategorySuggestion = base.SetStringAsString(TourCustomizationSchema.TourCategorySuggestion.FieldName, value);
			}
		}
		public virtual string s_GuideSuggestion
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.GuideSuggestion.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.GuideSuggestion.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.GuideSuggestion.FieldName);
			    else
			        this.GuideSuggestion = base.SetStringAsString(TourCustomizationSchema.GuideSuggestion.FieldName, value);
			}
		}
		public virtual string s_GuideID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.GuideID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.GuideID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.GuideID.FieldName);
			    else
			        this.GuideID = base.SetIntegerAsString(TourCustomizationSchema.GuideID.FieldName, value);
			}
		}
		public virtual string s_OtherRequest
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.OtherRequest.FieldName) ? string.Empty : base.GetStringAsString(TourCustomizationSchema.OtherRequest.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.OtherRequest.FieldName);
			    else
			        this.OtherRequest = base.SetStringAsString(TourCustomizationSchema.OtherRequest.FieldName, value);
			}
		}
		public virtual string s_PaymentID
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.PaymentID.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.PaymentID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.PaymentID.FieldName);
			    else
			        this.PaymentID = base.SetIntegerAsString(TourCustomizationSchema.PaymentID.FieldName, value);
			}
		}
		public virtual string s_BookingDate
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.BookingDate.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.BookingDate.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.BookingDate.FieldName);
			    else
			        this.BookingDate = base.SetIntegerAsString(TourCustomizationSchema.BookingDate.FieldName, value);
			}
		}
		public virtual string s_Status
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.Status.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.Status.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.Status.FieldName);
			    else
			        this.Status = base.SetIntegerAsString(TourCustomizationSchema.Status.FieldName, value);
			}
		}
		public virtual string s_EverHeard
		{
			get
			{
			    return this.IsColumnNull(TourCustomizationSchema.EverHeard.FieldName) ? string.Empty : base.GetIntegerAsString(TourCustomizationSchema.EverHeard.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(TourCustomizationSchema.EverHeard.FieldName);
			    else
			        this.EverHeard = base.SetIntegerAsString(TourCustomizationSchema.EverHeard.FieldName, value);
			}
		}
		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter TourCustomizationID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.TourCustomizationID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter FullName
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.FullName);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Address
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Address);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter CountryID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.CountryID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter CityName
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.CityName);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Telephone
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Telephone);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Fax
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Fax);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Email
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Email);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter ExpectedDepartureDate
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.ExpectedDepartureDate);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Adults
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Adults);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Children
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Children);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter DurationID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.DurationID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PortOfArrivalID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.PortOfArrivalID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter VisitationSuggestion
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.VisitationSuggestion);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter TourCategorySuggestion
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.TourCategorySuggestion);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter GuideSuggestion
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.GuideSuggestion);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter GuideID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.GuideID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter OtherRequest
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.OtherRequest);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PaymentID
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.PaymentID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter BookingDate
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.BookingDate);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Status
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.Status);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter EverHeard
				{
					get
					{
							WhereParameter wp = new WhereParameter(TourCustomizationSchema.EverHeard);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter TourCustomizationID
		    {
				get
		        {
					if(_TourCustomizationID_W == null)
	        	    {
						_TourCustomizationID_W = TearOff.TourCustomizationID;
					}
					return _TourCustomizationID_W;
				}
			}

			public WhereParameter FullName
		    {
				get
		        {
					if(_FullName_W == null)
	        	    {
						_FullName_W = TearOff.FullName;
					}
					return _FullName_W;
				}
			}

			public WhereParameter Address
		    {
				get
		        {
					if(_Address_W == null)
	        	    {
						_Address_W = TearOff.Address;
					}
					return _Address_W;
				}
			}

			public WhereParameter CountryID
		    {
				get
		        {
					if(_CountryID_W == null)
	        	    {
						_CountryID_W = TearOff.CountryID;
					}
					return _CountryID_W;
				}
			}

			public WhereParameter CityName
		    {
				get
		        {
					if(_CityName_W == null)
	        	    {
						_CityName_W = TearOff.CityName;
					}
					return _CityName_W;
				}
			}

			public WhereParameter Telephone
		    {
				get
		        {
					if(_Telephone_W == null)
	        	    {
						_Telephone_W = TearOff.Telephone;
					}
					return _Telephone_W;
				}
			}

			public WhereParameter Fax
		    {
				get
		        {
					if(_Fax_W == null)
	        	    {
						_Fax_W = TearOff.Fax;
					}
					return _Fax_W;
				}
			}

			public WhereParameter Email
		    {
				get
		        {
					if(_Email_W == null)
	        	    {
						_Email_W = TearOff.Email;
					}
					return _Email_W;
				}
			}

			public WhereParameter ExpectedDepartureDate
		    {
				get
		        {
					if(_ExpectedDepartureDate_W == null)
	        	    {
						_ExpectedDepartureDate_W = TearOff.ExpectedDepartureDate;
					}
					return _ExpectedDepartureDate_W;
				}
			}

			public WhereParameter Adults
		    {
				get
		        {
					if(_Adults_W == null)
	        	    {
						_Adults_W = TearOff.Adults;
					}
					return _Adults_W;
				}
			}

			public WhereParameter Children
		    {
				get
		        {
					if(_Children_W == null)
	        	    {
						_Children_W = TearOff.Children;
					}
					return _Children_W;
				}
			}

			public WhereParameter DurationID
		    {
				get
		        {
					if(_DurationID_W == null)
	        	    {
						_DurationID_W = TearOff.DurationID;
					}
					return _DurationID_W;
				}
			}

			public WhereParameter PortOfArrivalID
		    {
				get
		        {
					if(_PortOfArrivalID_W == null)
	        	    {
						_PortOfArrivalID_W = TearOff.PortOfArrivalID;
					}
					return _PortOfArrivalID_W;
				}
			}

			public WhereParameter VisitationSuggestion
		    {
				get
		        {
					if(_VisitationSuggestion_W == null)
	        	    {
						_VisitationSuggestion_W = TearOff.VisitationSuggestion;
					}
					return _VisitationSuggestion_W;
				}
			}

			public WhereParameter TourCategorySuggestion
		    {
				get
		        {
					if(_TourCategorySuggestion_W == null)
	        	    {
						_TourCategorySuggestion_W = TearOff.TourCategorySuggestion;
					}
					return _TourCategorySuggestion_W;
				}
			}

			public WhereParameter GuideSuggestion
		    {
				get
		        {
					if(_GuideSuggestion_W == null)
	        	    {
						_GuideSuggestion_W = TearOff.GuideSuggestion;
					}
					return _GuideSuggestion_W;
				}
			}

			public WhereParameter GuideID
		    {
				get
		        {
					if(_GuideID_W == null)
	        	    {
						_GuideID_W = TearOff.GuideID;
					}
					return _GuideID_W;
				}
			}

			public WhereParameter OtherRequest
		    {
				get
		        {
					if(_OtherRequest_W == null)
	        	    {
						_OtherRequest_W = TearOff.OtherRequest;
					}
					return _OtherRequest_W;
				}
			}

			public WhereParameter PaymentID
		    {
				get
		        {
					if(_PaymentID_W == null)
	        	    {
						_PaymentID_W = TearOff.PaymentID;
					}
					return _PaymentID_W;
				}
			}

			public WhereParameter BookingDate
		    {
				get
		        {
					if(_BookingDate_W == null)
	        	    {
						_BookingDate_W = TearOff.BookingDate;
					}
					return _BookingDate_W;
				}
			}

			public WhereParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public WhereParameter EverHeard
		    {
				get
		        {
					if(_EverHeard_W == null)
	        	    {
						_EverHeard_W = TearOff.EverHeard;
					}
					return _EverHeard_W;
				}
			}

			private WhereParameter _TourCustomizationID_W = null;
			private WhereParameter _FullName_W = null;
			private WhereParameter _Address_W = null;
			private WhereParameter _CountryID_W = null;
			private WhereParameter _CityName_W = null;
			private WhereParameter _Telephone_W = null;
			private WhereParameter _Fax_W = null;
			private WhereParameter _Email_W = null;
			private WhereParameter _ExpectedDepartureDate_W = null;
			private WhereParameter _Adults_W = null;
			private WhereParameter _Children_W = null;
			private WhereParameter _DurationID_W = null;
			private WhereParameter _PortOfArrivalID_W = null;
			private WhereParameter _VisitationSuggestion_W = null;
			private WhereParameter _TourCategorySuggestion_W = null;
			private WhereParameter _GuideSuggestion_W = null;
			private WhereParameter _GuideID_W = null;
			private WhereParameter _OtherRequest_W = null;
			private WhereParameter _PaymentID_W = null;
			private WhereParameter _BookingDate_W = null;
			private WhereParameter _Status_W = null;
			private WhereParameter _EverHeard_W = null;

			public void WhereClauseReset()
			{
				_TourCustomizationID_W = null;
				_FullName_W = null;
				_Address_W = null;
				_CountryID_W = null;
				_CityName_W = null;
				_Telephone_W = null;
				_Fax_W = null;
				_Email_W = null;
				_ExpectedDepartureDate_W = null;
				_Adults_W = null;
				_Children_W = null;
				_DurationID_W = null;
				_PortOfArrivalID_W = null;
				_VisitationSuggestion_W = null;
				_TourCategorySuggestion_W = null;
				_GuideSuggestion_W = null;
				_GuideID_W = null;
				_OtherRequest_W = null;
				_PaymentID_W = null;
				_BookingDate_W = null;
				_Status_W = null;
				_EverHeard_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private EasyObject _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
		
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter TourCustomizationID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.TourCustomizationID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter FullName
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.FullName);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Address
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Address);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter CountryID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.CountryID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter CityName
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.CityName);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Telephone
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Telephone);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Fax
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Fax);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Email
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Email);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter ExpectedDepartureDate
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.ExpectedDepartureDate);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Adults
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Adults);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Children
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Children);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter DurationID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.DurationID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PortOfArrivalID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.PortOfArrivalID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter VisitationSuggestion
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.VisitationSuggestion);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter TourCategorySuggestion
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.TourCategorySuggestion);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter GuideSuggestion
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.GuideSuggestion);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter GuideID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.GuideID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter OtherRequest
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.OtherRequest);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PaymentID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.PaymentID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter BookingDate
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.BookingDate);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Status
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.Status);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter EverHeard
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(TourCustomizationSchema.EverHeard);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter TourCustomizationID
		    {
				get
		        {
					if(_TourCustomizationID_W == null)
	        	    {
						_TourCustomizationID_W = TearOff.TourCustomizationID;
					}
					return _TourCustomizationID_W;
				}
			}

			public AggregateParameter FullName
		    {
				get
		        {
					if(_FullName_W == null)
	        	    {
						_FullName_W = TearOff.FullName;
					}
					return _FullName_W;
				}
			}

			public AggregateParameter Address
		    {
				get
		        {
					if(_Address_W == null)
	        	    {
						_Address_W = TearOff.Address;
					}
					return _Address_W;
				}
			}

			public AggregateParameter CountryID
		    {
				get
		        {
					if(_CountryID_W == null)
	        	    {
						_CountryID_W = TearOff.CountryID;
					}
					return _CountryID_W;
				}
			}

			public AggregateParameter CityName
		    {
				get
		        {
					if(_CityName_W == null)
	        	    {
						_CityName_W = TearOff.CityName;
					}
					return _CityName_W;
				}
			}

			public AggregateParameter Telephone
		    {
				get
		        {
					if(_Telephone_W == null)
	        	    {
						_Telephone_W = TearOff.Telephone;
					}
					return _Telephone_W;
				}
			}

			public AggregateParameter Fax
		    {
				get
		        {
					if(_Fax_W == null)
	        	    {
						_Fax_W = TearOff.Fax;
					}
					return _Fax_W;
				}
			}

			public AggregateParameter Email
		    {
				get
		        {
					if(_Email_W == null)
	        	    {
						_Email_W = TearOff.Email;
					}
					return _Email_W;
				}
			}

			public AggregateParameter ExpectedDepartureDate
		    {
				get
		        {
					if(_ExpectedDepartureDate_W == null)
	        	    {
						_ExpectedDepartureDate_W = TearOff.ExpectedDepartureDate;
					}
					return _ExpectedDepartureDate_W;
				}
			}

			public AggregateParameter Adults
		    {
				get
		        {
					if(_Adults_W == null)
	        	    {
						_Adults_W = TearOff.Adults;
					}
					return _Adults_W;
				}
			}

			public AggregateParameter Children
		    {
				get
		        {
					if(_Children_W == null)
	        	    {
						_Children_W = TearOff.Children;
					}
					return _Children_W;
				}
			}

			public AggregateParameter DurationID
		    {
				get
		        {
					if(_DurationID_W == null)
	        	    {
						_DurationID_W = TearOff.DurationID;
					}
					return _DurationID_W;
				}
			}

			public AggregateParameter PortOfArrivalID
		    {
				get
		        {
					if(_PortOfArrivalID_W == null)
	        	    {
						_PortOfArrivalID_W = TearOff.PortOfArrivalID;
					}
					return _PortOfArrivalID_W;
				}
			}

			public AggregateParameter VisitationSuggestion
		    {
				get
		        {
					if(_VisitationSuggestion_W == null)
	        	    {
						_VisitationSuggestion_W = TearOff.VisitationSuggestion;
					}
					return _VisitationSuggestion_W;
				}
			}

			public AggregateParameter TourCategorySuggestion
		    {
				get
		        {
					if(_TourCategorySuggestion_W == null)
	        	    {
						_TourCategorySuggestion_W = TearOff.TourCategorySuggestion;
					}
					return _TourCategorySuggestion_W;
				}
			}

			public AggregateParameter GuideSuggestion
		    {
				get
		        {
					if(_GuideSuggestion_W == null)
	        	    {
						_GuideSuggestion_W = TearOff.GuideSuggestion;
					}
					return _GuideSuggestion_W;
				}
			}

			public AggregateParameter GuideID
		    {
				get
		        {
					if(_GuideID_W == null)
	        	    {
						_GuideID_W = TearOff.GuideID;
					}
					return _GuideID_W;
				}
			}

			public AggregateParameter OtherRequest
		    {
				get
		        {
					if(_OtherRequest_W == null)
	        	    {
						_OtherRequest_W = TearOff.OtherRequest;
					}
					return _OtherRequest_W;
				}
			}

			public AggregateParameter PaymentID
		    {
				get
		        {
					if(_PaymentID_W == null)
	        	    {
						_PaymentID_W = TearOff.PaymentID;
					}
					return _PaymentID_W;
				}
			}

			public AggregateParameter BookingDate
		    {
				get
		        {
					if(_BookingDate_W == null)
	        	    {
						_BookingDate_W = TearOff.BookingDate;
					}
					return _BookingDate_W;
				}
			}

			public AggregateParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public AggregateParameter EverHeard
		    {
				get
		        {
					if(_EverHeard_W == null)
	        	    {
						_EverHeard_W = TearOff.EverHeard;
					}
					return _EverHeard_W;
				}
			}

			private AggregateParameter _TourCustomizationID_W = null;
			private AggregateParameter _FullName_W = null;
			private AggregateParameter _Address_W = null;
			private AggregateParameter _CountryID_W = null;
			private AggregateParameter _CityName_W = null;
			private AggregateParameter _Telephone_W = null;
			private AggregateParameter _Fax_W = null;
			private AggregateParameter _Email_W = null;
			private AggregateParameter _ExpectedDepartureDate_W = null;
			private AggregateParameter _Adults_W = null;
			private AggregateParameter _Children_W = null;
			private AggregateParameter _DurationID_W = null;
			private AggregateParameter _PortOfArrivalID_W = null;
			private AggregateParameter _VisitationSuggestion_W = null;
			private AggregateParameter _TourCategorySuggestion_W = null;
			private AggregateParameter _GuideSuggestion_W = null;
			private AggregateParameter _GuideID_W = null;
			private AggregateParameter _OtherRequest_W = null;
			private AggregateParameter _PaymentID_W = null;
			private AggregateParameter _BookingDate_W = null;
			private AggregateParameter _Status_W = null;
			private AggregateParameter _EverHeard_W = null;

			public void AggregateClauseReset()
			{
				_TourCustomizationID_W = null;
				_FullName_W = null;
				_Address_W = null;
				_CountryID_W = null;
				_CityName_W = null;
				_Telephone_W = null;
				_Fax_W = null;
				_Email_W = null;
				_ExpectedDepartureDate_W = null;
				_Adults_W = null;
				_Children_W = null;
				_DurationID_W = null;
				_PortOfArrivalID_W = null;
				_VisitationSuggestion_W = null;
				_TourCategorySuggestion_W = null;
				_GuideSuggestion_W = null;
				_GuideID_W = null;
				_OtherRequest_W = null;
				_PaymentID_W = null;
				_BookingDate_W = null;
				_Status_W = null;
				_EverHeard_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private EasyObject _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	}
}
